﻿using DocumentFormat.OpenXml.Lite.DrawingML.Base;
using DocumentFormat.OpenXml.Lite.DrawingML.Style;
using DocumentFormat.OpenXml.Lite.DrawingML.Types;
using DocumentFormat.OpenXml.Lite.Xml;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Schema;
using System.Xml.Serialization;

namespace DocumentFormat.OpenXml.Lite.DrawingML.Geometry
{
    [XmlRoot("ln", Namespace = Constants.Main)]
    public class Line : XmlSerializable
    {
        [Optional]
        [XmlAttribute("w", Form = XmlSchemaForm.Qualified)]
        public Nullable<int> Width { get; set; }

        [Optional]
        [XmlAttribute("cap", Form = XmlSchemaForm.Qualified)]
        public Nullable<ST_LineCap> EndingType { get; set; }

        [Optional]
        [XmlAttribute("cmpd", Form = XmlSchemaForm.Qualified)]
        public Nullable<ST_CompoundLine> Compound { get; set; }

        [Optional]
        [XmlAttribute("algn", Form = XmlSchemaForm.Qualified)]
        public Nullable<ST_PenAlignment> Alignment { get; set; }

        [Optional]
        [XmlElement("", Namespace = Constants.Main)]
        public ILineFillProperty LineFillProperty { get; set; }

        [Optional]
        [XmlElement("", Namespace = Constants.Main)]
        public ILineDashProperty LineDashProperty { get; set; }

        [Optional]
        [XmlElement("", Namespace = Constants.Main)]
        public ILineJoinProperty LineJoinProperty { get; set; }

        [Optional]
        [XmlElement("headEnd", Namespace = Constants.Main)]
        public EndStyle HeadEndStyle { get; set; }

        [Optional]
        [XmlElement("tailEnd", Namespace = Constants.Main)]
        public EndStyle TailEndStyle { get; set; }

        [Optional]
        [XmlElement("extLst", Namespace = Constants.Main)]
        public ExtensionList ExtensionList { get; set; }

        public Line() { }
    }
}
